#include"Heap.h"
void HeapSort(int* a, size_t size)
{
	for (int i = (size-1-1)/2; i >=0; i--)
	{
		AdjustDown(a, size,i);
	}
	for (int i = size-1; i > 0; i--)
	{
		Swap(&a[i], &a[0]);
		AdjustDown(a, i,0);
	}
}
int main()
{
	int arr[] = { 4,10,22,3,6,9,25,11,715 };
	HeapSort(arr, sizeof(arr) / sizeof(arr[0]));
	return 0;
}